home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c / 703 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.2 KB

  1. Path: mcdaniel.dallas.tx.us!not-for-mail
  2. From: tmcd@crl.com (Timothy A. McDaniel)
  3. Newsgroups: comp.std.c
  4. Subject: Re: Initializing a variable in terms of itself
  5. Date: 6 Apr 1996 16:18:46 GMT
  6. Organization: Tim McDaniel's home IBM-PC clone running Linux
  7. Message-ID: <4k65h6$dfe@nntp.crl.com>
  8. References: <4jpj9l$ik9@cnn.Princeton.EDU> <KANZE.96Apr2171323@slsvgqt.lts.sel.alcatel.de>
  9. Reply-To: tmcd@crl.com
  10. NNTP-Posting-Host: crl11.crl.com
  11. X-Newsreader: perl5newspkg
  12.  
  13. In article <KANZE.96Apr2171323@slsvgqt.lts.sel.alcatel.de>,
  14. James Kanze US/ESC 60/3/141 #40763 <kanze@lts.sel.alcatel.de> wrote:
  15. >In article <4jpj9l$ik9@cnn.Princeton.EDU> tim@franck (Tim Hollebeek)
  16. >writes:
  17. ...
  18. >|>     int x = x;
  19. ...
  20. >The reference to `x' in the initialization expression is not, per se,
  21. >illegal.  The variable is declared, and available for use, as soon as
  22. >the compiler sees the `=' sign.
  23.  
  24. So
  25.     void *x = &x;
  26. would be legal, then, and x would point to itself?  (Or would it have
  27. to be
  28.     void *x = (void *) &x;
  29. ?)
  30.  
  31. -- 
  32.                              Tim McDaniel
  33.                         Reply-To: tmcd@crl.com
  34.                    Work account is mcdaniel@cpm.com
  35.               Never use mcdaniel@mcdaniel.dallas.tx.us.
  36.